{extend name='public/modal'}
{block name='content'}
<div class="layui-fluid lotus-form">
    <div class="layui-row">
        <form action="addRule" class="layui-form layui-form-pane" id="lotus-add-form" method="post">


            <div class="layui-form-item">
                <label class="layui-form-label">
                    上级权限
                </label>
                <div class="layui-input-block">
                    <select lay-filter="aihao" name="pid">
                        <option value="0">顶级权限</option>
                        {volist name='auth' id='vo'}
                        <option value="{$vo.id}">{$vo.level-1|str_repeat='丨--',###}{$vo.title}</option>
                        {/volist}
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">权限名称</label>
                <div class="layui-input-block">
                    <input autocomplete="off" class="layui-input" lay-verify="required" name="title" type="text">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">路由</label>
                <div class="layui-input-block">
                    <input autocomplete="off" class="layui-input" lay-verify="required" name="name"
                           placeholder="例如:admin/user/userList"
                           type="text" value="">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">
                    用户角色
                </label>
                <div class="layui-input-block">
                    <select lay-filter="aihao" name="status">
                        <option value="0">显示</option>
                        <option value="1">隐藏</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"><a href="https://www.layui.com/doc/element/icon.html#table"
                                                   target="_blank">图标(点)</a></label>
                <div class="layui-input-block">
                    <input autocomplete="off" class="layui-input" name="icon" type="text">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">排序权重</label>
                <div class="layui-input-block">
                    <input autocomplete="off" class="layui-input" lay-verify="required" name="sort" type="number"
                           value="0">
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="toSubmit" lay-submit="" style="margin-left: 30%">提交</button>
                    <button class="layui-btn layui-btn-primary" id="reset" type="reset">重置</button>
                </div>
            </div>

        </form>
    </div>
</div>
<script>
    layui.use(['laydate', 'form', 'upload', 'layer', 'jquery'], function () {
        var laydate = layui.laydate
            , upload = layui.upload
            , layer = layui.layer
            , $ = layui.jquery
            , form = layui.form;
        form.render();
    });
</script>
{/block}




